﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Net5ApiAndEfMySql.DtoModel;
using Net5ApiAndEfMySql.PoModel.SystemAdmin;


namespace Net5ApiAndEfMySql.IRepository.SystemAdmin
{
    public interface IRoleDbRepository
    {
        string GetRoleByOprole(string userName);
        // RoleDbPo GetRoleByOprole(string userName);
        /// <summary>
        /// 角色分页查询
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        PagerResult<RoleDbPo> GetPageList(SearchModel m);
        /// <summary>
        /// 角色的添加
        /// </summary>
        /// <param name="role"></param>
        /// <returns></returns>
        bool AddRole(RoleDbPo role);
        /// <summary>
        /// 角色的反填
        /// </summary>
        /// <param name="role_id"></param>
        /// <returns></returns>
        RoleDbPo GetRoleById(int role_id);
        /// <summary>
        /// 角色的修改
        /// </summary>
        /// <param name="role"></param>
        /// <returns></returns>
        bool UpdateRoleDbPo(RoleDbPo role);
        /// <summary>
        /// 角色的删除
        /// </summary>
        /// <param name="role_id"></param>
        /// <returns></returns>
        bool DeleteRoleDbPo(int role_id);


        List<RoleDbPo> GetRoleListByUserName(int os_id);
    }
}
